home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / QUIZGAM.DIR / 00265_Script_HTTP scripts (Mac and Win) < prev    next >
Text File  |  1996-03-19  |  931b  |  44 lines

  1. on initLeoURL
  2.   global LeoGameURL
  3.   set LeoGameURL = "www.softkey.com/catalog/index.htm"
  4. end
  5.  
  6. on checkLeoGame
  7.   initLeoURL
  8.   
  9.   if the machineType = 256 then
  10.     return checkLeoGameWin()
  11.   else
  12.     return checkLeoGameMac()
  13.   end if
  14. end
  15.  
  16. on checkLeoGameMac
  17.   global LeoGameURL
  18.   openxlib the pathname & "XOBJS:startHTTP"
  19.   
  20.   startHTTP(the pathname & "XOBJS:httpX", LeoGameURL, "")
  21.   
  22.   put the result into gotURL
  23.   closexlib the pathname & "XOBJS:startHTTP"
  24.   return gotURL contains "true"
  25. end
  26.  
  27. on checkLeoGameWin
  28.   global LeoGameURL
  29.   
  30.   openxlib the pathname & "XOBJS\HTTP"
  31.   set httpXObj to http(mNew)
  32.   if not objectP(httpXObj) then
  33.     alert "Error initializing the HTTP XObject"
  34.     return FALSE
  35.   end if
  36.   
  37.   httpXObj(mGet, LeoGameURL, "", 0)
  38.   
  39.   put the result into problemsWithURL
  40.   
  41.   httpXObj(mDispose)
  42.   closexlib the pathname & "XOBJS\http"
  43.   return problemsWithURL = 0
  44. end